graph TD
    Start[Start] --> AboutOrg[About Organization Form]
    AboutOrg -->|Set Name, Logo, Bio| Teams[Add Teams]
    Teams -->|Create/Migrate Teams| Members[Add Team Members]
    Members -->|Add Members & Invite| Payment[Payment]
    Payment -->|Create Payment Intent| StripeCheckout[Stripe Checkout]
    StripeCheckout -->|Success| PaymentSuccess[Payment Success View]
    StripeCheckout -->|Failure| Payment
    
    subgraph "About Organization"
        AboutOrg -->|Store in onboardingStore| OrgData[Organization Data]
        OrgData -->|"Name, Logo, Bio"| ValidateSlug[Validate Slug]
    end
    
    subgraph "Teams Setup"
        Teams -->|Store in onboardingStore| TeamData[Teams Data]
        TeamData -->|"Create New/Migrate"| TeamMembers[Team Members]
    end
    
    subgraph "Members Setup"
        Members -->|Store in onboardingStore| MemberData[Members Data]
        MemberData -->|"Invited/Migrating"| MembersList[Members List]
    end
    
    subgraph "Payment Process"
        Payment -->|Create Intent| PaymentData[Payment Data]
        PaymentData -->|"Billing Period, Price/Seat"| StripeSession[Stripe Session]
    end
    
    subgraph "Webhook Handling"
        StripeCheckout -->|invoice.paid| WebhookHandler[Webhook Handler]
        WebhookHandler -->|Process Payment| OrgCreation[Create Organization]
        OrgCreation --> Complete[Complete]
    end

    style Start fill:#f9f,stroke:#333,stroke-width:2px
    style Complete fill:#9f9,stroke:#333,stroke-width:2px
    style StripeCheckout fill:#fdd,stroke:#333,stroke-width:2px
    style WebhookHandler fill:#ddf,stroke:#333,stroke-width:2px 